CQG Algorithmic Orders
AlgoOrder Time-Weighted Average Price (TWAP)
See Also  Send Feedback

Glossary Item Box

 

Show

How Does TWAP Work?

To place a TWAP algorithmic order in CQG IC, a trader defines the Algorithmic Order (AO) size (contracts), the chunk size (contracts) of each leg, the time interval (seconds) between legs, and the distance (how many ticks) from the market.

When confirmed, the algorithmic order is handed over to the AlgoOrder TWAP application, which runs locally in the background and places the leg orders as specified in the AO.

If the order type is not Market, and Distance is not 0; AO TWAP will place the first chunk at the given order price and each subsequent chunk at a number of ticks away (specified by Distance) from the market price.

The trader may check the AO application's Monitor for updates about algorithmic orders that still have some pending legs to be placed.

The algorithmic order (i.e., in this case its pending legs) can be cancelled from the Monitor.

On the other hand, legs that the application has already placed can be viewed and managed through CQG IC.

Order IDs for leg orders have the general format of COTWAPxxxxyyyy-Z, which can be deciphered as following:


  • xxxx - the serial number of the algorithmic order placed through the application's current session. This value is reset after restarting the application.
  • yyyy - the serial number of the leg for the xxxx AO. This value is reset for each AO.
  • Z - multi-digit serial number of orders placed through the given instance of the application.

Notes:

If you set the Distance to '0', the AlgoOrder TWAP application will place the leg orders with the price specified in the Order Routing Interface element (e.g., Order Ticket) you have used to place the TWAP order.

If you place a Market order of TWAP type, the Distant parameter will be ignored and the AlgoOrder TWAP application will simply place market orders of specified chunk size at specified time intervals.

ShowConfiguration Manager

To customize the AlgoOrder TWAP, right-click on the AlgoOrder TWAP icon in the system tray and from the popup menu select the Configuration Manger.

Customize the application properties as following:

  • Long Name:

    This field contains the algorithmic order type name that will be displayed in the Special Orders dropdown list in CQGIC.
    It is advisable to use a descriptive name for this field.

  • Short Name:
    This short form of the order type name is used in order ID or the UEName (e.g., COTWAPxxxxyyyy-Z) in CQG IC. Although you may insert longer strings, CQG IC will use the first four characters of your entry to create the order UENames. This short form will also be used in the Special Orders dropdown button in CQG IC.
    It is advisable to use easily recognizable short names, no longer than four characters.

  • Balloon Tip Level:
    Determines the lower level of importance that should be used to filter out events to be displayed as tool tips in the system tray area.

    • None: Nothing will be displayed.

    • Info: All events will be displayed.

    • Warning: Warning or Error events will be displayed.

    • Error: Only Error events will be displayed.

  • Log Level:
    Messages received by the logger that are at or above the specified log level are delivered to the log file.

    • None: Nothing will be logged.

    • Info: All events will be logged.

    • Warning: Warning or Error events will be logged.

    • Error: Only Error events will be logged.

  • Log File Max Size:
    Determines the size of the log file that when reached, the program will start writing into a new log file.
    The maximum allowed file size is 32768 KB or 32 MB.

  • Log Files Max Count:
    Determines the number of log files that when reached, the program will delete the oldest file before starting a new log file.
    The maximum allowed number of log files is 100.

ShowLogs

The AlgoOrder TWAP creates log files as specified in the Configuration Manager.

Logs can be accessed through the Show Logs popup menu. Search for the file names with the "CQGAlgoOrder" prefix.

ShowMonitor

The AlgoOrder TWAP Monitor displays the current state of the working algorithmic orders (i.e., those that still have pending legs to be placed).

To open the Monitor right-click on the AlgoOrder TWAP icon in the system tray and select Monitor from the popup menu.

The following algorithmic order properties are listed in the table:

  1. Algo Order ID
  2. Status
  3. Account ID
  4. Instrument
  5. Total Quantity
  6. Filled Quantity
  7. Chunk Size
  8. Time Interval
  9. Distance from Market

To cancel an order from the working orders listed in the Monitor, mark off its check box and click the [Cancel Selected Orders] button. Alternatively, you may right-click on the order and from the popup menu select Cancel Order.

To cancel all orders, click the [Cancel All Orders] button. You may also right-click in the orders list area and from the popup menu select Cancel All Orders, or by closing the AlgoOrder TWAP application.

Namespaces

NamespaceDescription
AlgorithmicOrders 
Copyright © 2012 CQG Inc. All Rights Reserved.